package bairui.international.model.type;

/**
 *
 * (状态记录类型)Type_StateRecord
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("状态记录类型")
@com.lianjing.sh.processing.info.annotation.InfoComment("状态记录类型")
public enum Type_StateRecord implements com.sh_lianjing.standard.EnumCommentable<Type_StateRecord> {

	/**
	 * (推进)Flow</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("推进")
	@com.lianjing.sh.processing.info.annotation.InfoComment("推进")
	Flow("推进")
,
	/**
	 * (通过)Pass</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("通过")
	@com.lianjing.sh.processing.info.annotation.InfoComment("通过")
	Pass("通过")
,
	/**
	 * (未通过)NoPass</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("未通过")
	@com.lianjing.sh.processing.info.annotation.InfoComment("未通过")
	NoPass("未通过")
;

	private static java.util.Map<String, Type_StateRecord> Cache = new java.util.HashMap<>();
	static{
		for(Type_StateRecord enumItem : Type_StateRecord.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_StateRecord(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_StateRecord parseByComment(String comment) {
		return Type_StateRecord.parse(comment);
	}

	public static Type_StateRecord parse(String comment) {
		Type_StateRecord enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_StateRecord.class, comment);
		}
		return enumItem;
	}

}
